EXERCISE 4: This program is hard to read. Let's use functions to organize it and make it easier to read and edit.

  • In LOGIC, go to and drag out Define Function to the bottom of the program.
  • Change the name of this function from my_function() to spell_1().
  • Move all of the code for summoning a meteor within the function. Remember, this means the code should be indented!

To navigate the page using the TAB key, first press ESC to exit the code editor.

# THIS ACTIVITY IS IN PREVIEW ONLY MODE
  • Run Code
  • Submit Work
  • Next Activity
  • Show Console
  • Reset Code Editor
  • Codesters How To (opens in a new tab)